#include <iostream>
//#include <string>
#include <stdlib.h>
#include <string.h>

using namespace std;

int main( int argc, char* argv[] ){

	char* binary = argv[1];
	int decimal;
	int length = strlen(binary);

	for (int i=length; i){
		//cout << *(binary+i);
		decimal += *(binary-i);
		cout << decimal << endl;
	}

	

	cout << endl;

return 0;
}
